﻿using ComprehensiveSystem.Configuration;
using SqlSugar.IOC;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ComprehensiveSystem.Core.Config
{
    public class DataBaseConfig
    {
        public static readonly List<IocConfig> DataBaseList = new List<IocConfig>(){ new IocConfig()
            {
                //数据库连接
                ConnectionString = AppSettingsConstVars.DbSqlConnection,
                //判断数据库类型
                DbType = IocDbType.MySql,
                //是否开启自动关闭数据库连接-//不设成true要手动close
                IsAutoCloseConnection = true,
                ConfigId= "coreshop"
            },new IocConfig()
            {
                //数据库连接
                ConnectionString = AppSettingsConstVars.Base_Sap_Daily_ZY_NEW,
                //判断数据库类型
                DbType = AppSettingsConstVars.DbDbType == IocDbType.MySql.ToString() ? IocDbType.MySql : IocDbType.SqlServer,
                //是否开启自动关闭数据库连接-//不设成true要手动close
                IsAutoCloseConnection = true,
                ConfigId= "Base_Sap_Daily_ZY_NEW"
            },
               new IocConfig()
            {
                //数据库连接
                ConnectionString = AppSettingsConstVars.Base_Sap_Patient_ZY_NEW,
                //判断数据库类型
                DbType = AppSettingsConstVars.DbDbType == IocDbType.MySql.ToString() ? IocDbType.MySql : IocDbType.SqlServer,
                //是否开启自动关闭数据库连接-//不设成true要手动close
                IsAutoCloseConnection = true,
                ConfigId = "Base_Sap_Patient_ZY_NEW"
            },
               new IocConfig()
               {
                   //数据库连接
                   ConnectionString = AppSettingsConstVars.BoGu_SAP,
                   //判断数据库类型
                   DbType = AppSettingsConstVars.DbDbType == IocDbType.MySql.ToString() ? IocDbType.MySql : IocDbType.SqlServer,
                   //是否开启自动关闭数据库连接-//不设成true要手动close
                   IsAutoCloseConnection = true,
                   ConfigId = "BoGu_SAP"
               },new IocConfig()
               {
                   //数据库连接
                   ConnectionString = AppSettingsConstVars.NanChang_Base_Team_ZY_NEW,
                   //判断数据库类型
                   DbType = AppSettingsConstVars.DbDbType == IocDbType.MySql.ToString() ? IocDbType.MySql : IocDbType.SqlServer,
                   //是否开启自动关闭数据库连接-//不设成true要手动close
                   IsAutoCloseConnection = true,
                   ConfigId = "NanChang_Base_Team_ZY_NEW"
               } };
    }
}
